<template>
  <div id='wrap'>
    <h1>defineExpose</h1>
    <scu24 ref="funs"></scu24>
    <button @click="callChildMethods">調用子組件的方法</button>
  </div>
</template>

<script lang='ts'>
export default {
  name: 'scu28',
}
</script>

<script lang='ts' setup>
import { useTemplateRef } from 'vue'
import scu24 from "./components/scu24.vue";
const funs=useTemplateRef('funs')
const callChildMethods=()=>{
  funs.value?.childMethod('参数')
  funs.value?.resetData()
}
</script>

<style scoped lang='scss'>

</style>